package agriculture.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

//订单主表实体
@Data
@TableName("orders")
public class Order {
    @TableId(type = IdType.AUTO)
    private Long Id;
    private Long userId;
    private String orderNumber;
    private BigDecimal totalAmount;  //单价
    private LocalDateTime paymentTime;
    private LocalDateTime createTime;
    private String status;
    private String productName;
    private String productImg;
    private Long productId;
    private String receiverPhone;
    private String receiverName;
    private String receiverAddress;

    @Override
    public String toString() {
        return "Order{" +
                "Id=" + Id +
                ", userId=" + userId +
                ", orderNumber='" + orderNumber + '\'' +
                ", totalAmount=" + totalAmount +
                ", paymentTime=" + paymentTime +
                ", createTime=" + createTime +
                ", status='" + status + '\'' +
                ", productName='" + productName + '\'' +
                ", productImg='" + productImg + '\'' +
                ", productId=" + productId +
                ", receiverPhone='" + receiverPhone + '\'' +
                ", receiverName='" + receiverName + '\'' +
                ", receiverAddress='" + receiverAddress + '\'' +
                '}';
    }
}
